package com.kuqi.entitiy;

public enum VideoType {

    SHORTVIDEO(200, "短视频"),
    NEWSVIDEO(400,"新闻频道"),
    SOAPOPERA(300, "连续剧"),
    SOAPOPERAItem(301, "连续剧(其中一集)");

    // 关键字 可以是任意类型
    private int code;
    // 描述
    private String msg;

    // 构造函数
    VideoType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    // 获取信息描述
    public static String msg(int code) {
        for (VideoType m : VideoType.values()) {
            if (m.getCode() == code) {
                return m.getMsg();
            }
        }
        return "UNDEFINE";
    }


    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
